package com.example.handler;

import com.exmaple.dto.RpcRequest;
import com.exmaple.handler.IHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;

@Service
public class TestHandler implements IHandler {

    Logger logger = LoggerFactory.getLogger(getClass());

    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @Override
    public void handler(RpcRequest rpcRequest) throws Exception {
        logger.warn("客户端任务调用: {} ", simpleDateFormat.format(new Date()));
    }
}
